// Table 2. Main results

use "eseewithinfirm.dta", clear

local filename "table2"
xi: xtreg lnval crisisXlonginv i.category , fe cluster(firmid )
outreg2  using "`filename'", word replace label  nocons dec(3)  keep(crisisXlonginv crisis) addtext(Category FEs, YES, Firm FEs, NO, Year FEs, NO, Firm*year FEs, YES ) 
xi: xtreg lnval2 crisisXlonginv i.category , fe cluster(firmid )
outreg2  using "`filename'", word  label  nocons dec(3)  keep(crisisXlonginv crisis) addtext(Category FEs, YES, Firm FEs, NO, Year FEs, NO, Firm*year FEs, YES , Incl 0s, YES) 
xi: xtreg inv_stock crisisXlonginv i.category if lnval!=., fe cluster(firmid )
outreg2  using "`filename'", word  label  nocons dec(3)  keep(crisisXlonginv crisis) addtext(Category FEs, YES, Firm FEs, NO, Year FEs, NO, Firm*year FEs, YES ) 
xi: xtreg inv_stock crisisXlonginv i.category , fe cluster(firmid )
outreg2  using "`filename'", word  label  nocons dec(3)  keep(crisisXlonginv crisis) addtext(Category FEs, YES, Firm FEs, NO, Year FEs, NO, Firm*year FEs, YES , Incl 0s, YES) 
xi: xtreg lnval i.year*longinv8 i.category, fe cluster(firmid)
outreg2  using "`filename'", word  label dec(3)  nocons keep(_IyeaXlon_2*) 
